import smtplib
from email.mime.multipart import MIMEMultipart
from email.mime.text import MIMEText

def sm(receiver,title,body):
	host='smtp.163.com'
	port=25
	sender='netldds@163.com'
	pwd='qwe2855759'

	msg=MIMEMultipart()
	msg['subject']=title
	msg['from']=sender
	msg['to']=receiver
	msg.attach(MIMEText(body))

	s=smtplib.SMTP(host,port)
	s.login(sender,pwd)
	s.sendmail(sender,receiver,str(msg))
	s.quit()

	print('The mail named %s to %s is sended successly.'%(title,receiver))

if __name__ == '__main__':
	sm('378818329@qq.com','逗逼要接的一封信13','啊啊啊啊啊哈哈哈哈哈哈哈 ')
